﻿Namespace Essential.UI
    Public Class PseudoContextMenu
        Inherits System.Windows.Controls.ContextMenu
        Event ShowPCM()
        Event HidePCM()
        Protected Overrides Sub OnClosed(ByVal e As System.Windows.RoutedEventArgs)
            RaiseEvent HidePCM()
        End Sub
        Public Overrides Sub BeginInit()
        End Sub
        Protected Overrides Sub OnOpened(ByVal e As System.Windows.RoutedEventArgs)
            Width = 0
            Height = 0
            RaiseEvent ShowPCM()
        End Sub
        Protected Overrides Sub OnContextMenuOpening(ByVal e As System.Windows.Controls.ContextMenuEventArgs)
            MyBase.OnContextMenuOpening(e)
        End Sub
        Protected Overrides Sub OnContextMenuClosing(ByVal e As System.Windows.Controls.ContextMenuEventArgs)
            MyBase.OnContextMenuClosing(e)
        End Sub
    End Class
End Namespace